package common.util;

import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;

public class PackageHelper {
	
	public static final boolean isInstalled(Context context, String pkg) {
		PackageManager pm = context.getPackageManager();
		for (ApplicationInfo app : pm.getInstalledApplications(PackageManager.GET_META_DATA)) {
			if (app.packageName.equals(pkg)) {
				return true;
			}
		}
		return false;
	}
}
